package com.chao.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chaojp
 * @Description: TODO
 * @Date: 2024/4/21 11:31
 * @Version: 1.0
 */
@RefreshScope
@RestController
public class TestController {
    
    @Value("${name}")
    private String name;
    @Value("${password}")
    private String password;

    @GetMapping("/name")
    public String getName() {
        return name;
    }
    @GetMapping("/password")
    public String getPassword() {
        return password;
    }
}
